<html>
<head><meta charset="utf-8"><title>hiding hacks a la #60118 · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html">hiding hacks a la #60118</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164713012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164713012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164713012">(May 02 2019 at 14:33)</a>:</h4>
<p>I think <span class="user-mention" data-user-id="119031">@Esteban Küber</span> we should not be asking "to write or not to write" but rather "how can we structure the system to make these sorts of hacks elegant"</p>



<a name="164713117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164713117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164713117">(May 02 2019 at 14:34)</a>:</h4>
<p>FWIW, I am trying to extract lexer into the library, and this is hard in part because error reporting is a perfect cement that keeps all the pieces together :-)</p>



<a name="164713161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164713161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164713161">(May 02 2019 at 14:35)</a>:</h4>
<p>That said, I think that -- looking at this PR -- it does feel like something of a maintenance burden going forward.</p>



<a name="164713166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164713166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164713166">(May 02 2019 at 14:35)</a>:</h4>
<p>It's the global mutable state that has me scared :)</p>



<a name="164713175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164713175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164713175">(May 02 2019 at 14:35)</a>:</h4>
<p>(Among other things)</p>



<a name="164713301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164713301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164713301">(May 02 2019 at 14:36)</a>:</h4>
<p>In <a href="https://github.com/rust-lang/rust/pull/60261" target="_blank" title="https://github.com/rust-lang/rust/pull/60261">https://github.com/rust-lang/rust/pull/60261</a> I've tried to teas apart error-detection and error-reporting logic, this generally seems like a nicer approach  for librarification. But probably also <strong>less</strong> powerful one, as some kinds of errors will be hard to report in this fashion.</p>



<a name="164717709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164717709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164717709">(May 02 2019 at 15:26)</a>:</h4>
<p>The thing that I find difficult with with these kind of errors, where the recovery would imply keeping around two different parses around and deciding later which one was correct necessitate this kind of spooky action at a distance</p>



<a name="164717732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164717732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164717732">(May 02 2019 at 15:27)</a>:</h4>
<p>And for the most part the global state is append only <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="164717808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164717808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164717808">(May 02 2019 at 15:28)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> I would say rip diagnostics out and then we can re add them one at a time</p>



<a name="164717829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164717829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164717829">(May 02 2019 at 15:28)</a>:</h4>
<p>It is a very parallelizable problem that can be fixed by throwing people at it</p>



<a name="164723363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164723363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164723363">(May 02 2019 at 16:37)</a>:</h4>
<blockquote>
<p>And for the most part the global state is append only <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>
</blockquote>
<p>this still affects incremental</p>



<a name="164726847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/hiding%20hacks%20a%20la%20%2360118/near/164726847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/hiding.20hacks.20a.20la.20.2360118.html#164726847">(May 02 2019 at 17:20)</a>:</h4>
<p>Fair enough</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>